package com.gilight.base.admin.user;

import com.gilight.base.base.exception.ServiceException;
import com.gilight.base.model.Page;
import com.gilight.base.model.uni.UserDO;
/**用户管理
 * Created with IntelliJ IDEA.
 * Description:
 * User: kbq
 * Date: 2019-07-11
 * Time: 下午7:30
 */

public interface AdminUserService {

    /**
     * 创建
     * @param adminId
     * @param user
     * @return
     * @throws ServiceException
     */
    public Boolean create(
            Long adminId,
            UserDO user) throws ServiceException;

    /**
     * 删除
     * @param adminId
     * @param id
     * @param nickname 用户id
     * @return
     * @throws ServiceException
     */
    public Boolean delete(
            Long adminId,
            Long id,
            String nickname) throws ServiceException;

    /**
     * 修改
     * @param adminId
     * @param user  用户信息
     * @return
     * @throws ServiceException
     */
    public Boolean edit(
            Long adminId,
            UserDO user) throws ServiceException;

    /**
     * 激活冻结
     * @param adminId
     * @param userId
     * @param status
     * @return
     * @throws ServiceException
     */
    public Boolean editStatus(
            Long adminId,
            Long userId,
            Integer status) throws ServiceException;

    /**
     * 查询
     * @param adminId
     * @param id
     * @param nickname 用户昵称
     * @param level    用户等级
     * @param gender   用户性别
     * @param status   用户状态
     * @param pageNo   当前页码
     * @param limit    页码长度
     * @return
     * @throws ServiceException
     */
    public Page<UserDO> list(
            Long adminId,
            Long id,
            String nickname,
            Integer level,
            Integer gender,
            Integer status,
            Integer pageNo,
            Integer limit) throws ServiceException;

}
